package com.af.jwt.service;

import com.af.jwt.entity.User;
import com.af.jwt.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author andyfan
 * @date 2019-05-24 15:52
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User findByUsername(User user) {
        return userMapper.findByUsername(user.getUsername());
    }

    public User findUserById(String userId) {
        return userMapper.findUserById(userId);
    }

}
